// Lang_04 [while loops].nova // The application class. class WhileLoopsApp { // Application class's "main" function. public static void main( String[] args ) { // Declare and initialize an Integer to zero. int i = 0; // Iterate while i is less than 5. while ( i < 5 ) { // Output the value of i. Stream.writeLine( "while loop: i = " + Integer.toString( i ) ); // Increment the value of i by 1. ++i; } // Output the final value of i. Stream.writeLine( "final value: i = " + Integer.toString( i ) ); } }